<div>
  <form class="form-horizontal" role="form" name="myForm" novalidate ng-init="initQuery()">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:270px;" ng-class="{'shou':!flag.showSearchPanel}"
           ng-switch
           on="params.timeType">
        <div>
          <label style="width:70px">账期</label>
          <md-select ng-model="params.timeType" placeholder="月">
            <md-option ng-value="tp.timeTypeCode" ng-repeat="tp in timeTypes" ng-click="changeTime(tp.timeTypeCode)">{{tp.timeTypeName}}</md-option>
          </md-select>
        </div>
        <div ng-switch-when="5">
          <md-input-container flex>
            <label>开始时间</label>
            <input type="number" ng-model="params.startTime"  time-validate="year"
                   end-time="params.endTime"
                   required name="startTime">

            <div ng-messages="myForm.startTime.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div ng-switch-when="5">
          <md-input-container flex>
            <label>结束时间</label>
            <input type="number" ng-model="params.endTime"  time-validate="year"
                   start-time="params.startTime"
                   required name="endTime">

            <div ng-messages="myForm.endTime.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div ng-switch-when="1">
          <md-input-container flex>
            <label>开始时间</label>
            <input type="date" ng-model="params.startTime"  time-validate="day"
                   end-time="params.endTime"
                   required name="startTime">

            <div ng-messages="myForm.startTime.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div ng-switch-when="1">
          <md-input-container flex>
            <label>结束时间</label>
            <input type="date" ng-model="params.endTime"  time-validate="day"
                   start-time="params.startTime"
                   required name="endTime">

            <div ng-messages="myForm.endTime.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div ng-switch-when="3">
          <md-input-container flex>
            <label>开始时间</label>
            <input type="month" ng-model="params.startTime"  time-validate="month"
                   end-time="params.endTime"
                   required name="startTime">

            <div ng-messages="myForm.startTime.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div ng-switch-when="3">
          <md-input-container flex>
            <label>结束时间</label>
            <input type="month" ng-model="params.endTime"  time-validate="month"
                   start-time="params.startTime"
                   required name="endTime">

            <div ng-messages="myForm.endTime.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <label style="width:70px">交易类型</label>
          <md-select ng-model="params.tradTypeCode">
            <md-option ng-value="0">全部</md-option>
            <md-option ng-value="ty.tradeTypeCode" ng-repeat="ty in tradTypes">
              {{ty.tradeTypeName}}
            </md-option>
          </md-select>
        </div>
        <div>
          <label>返回码</label>
          <md-input-container flex>
            <label>输入*号查询全部</label>
            <input type="text" ng-model="params.resultcode" maxlength="40"/>
          </md-input-container>
        </div>
        <div>
          <label style="width:100px">省二级返回码</label>
          <md-input-container flex>
            <label>输入*号查询全部</label>
            <input type="text" ng-model="params.rspcodeheader" maxlength="40"/>
          </md-input-container>
        </div>
        <div>
          <label style="width:100px">统一支付流水号</label>
          <md-input-container flex>
            <label>输入*号查询全部</label>
            <input type="text" ng-model="params.transido" maxlength="40"/>
          </md-input-container>
        </div>
        <div>
          <md-switch ng-change="changeAccess()" ng-model="params.isAccess">{{Access}}</md-switch>
        </div>
      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="flag.showSearchPanel"
         ng-click="hideSearchPanel()" ng-hide="myForm.$invalid||flag.hideLittleUp"></i>
      <md-button ng-disabled="myForm.$invalid" ng-click="search()"
                 class="md-fab md-primary md-hue-1"
                 aria-label="Profile">
        <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;"
           ng-show="!flag.showSearchPanel"></i>

        <i class="glyphicon glyphicon-search" ng-show="flag.showSearchPanel"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
      <div class="menus" ng-show="flag.showIcon">
        <form action="{{formPrefix}}" target="_black" method="post"
              style="display: initial;">
          <input type="hidden" name="data" value="{{sendData}}">
          <md-button type="submit" class="md-raised">导出Excel</md-button>
        </form>
        <!--<md-button type="submit" class="md-raised" ng-click="updateViews()">批量修改</md-button>-->
      </div>
      <div ng-show="flag.viewType === 'table'" >
        <div class="table-detail">
          <div class="t_r" style="overflow-x: scroll;">
            <table class="table table-bordered" style="min-width: 100%;max-width: none;table-layout: fixed;word-break:break-all;">
              <caption style="text-align:center;font-size:large;font-weight:bold;color:black">
                {{title}}
              </caption>
              <thead>
              <tr>
                <!--<th><md-checkbox ng-change="checkAll()" ng-model="all"></md-checkbox></th>-->
                <th width="40px">账期</th>
                <th width="80px">交易类型</th>
                <th width="120px">省二级返回码</th>
                <th width="160px">省二级返回码描述</th>
                <th width="120px">内部机构代码</th>
                <th width="100px">二级返回码</th>
                <th width="140px">二级返回码描述</th>
                <th width="100px">订单号</th>
                <th width="140px">统一支付流水号</th>
                <th width="120px">省操作流水号</th>
                <th width="120px">用户号码</th>
                <th width="120px">交易发起时间</th>
                <th width="120px">省交易开始时间</th>
                <th width="140px">省落地交易时间</th>
                <th width="80px">是否考核</th>
                <!--<th>操作</th>-->
              </tr>
              </thead>
              <tbody>
              <tr ng-repeat="data in tradDataList">
                <!--<td><md-checkbox ng-model="data.checked" ng-change="checkItem()"></md-checkbox></td>-->
                <!--<td class="diffcount-td" ng-repeat="d in data track by $index">
                  <div style="width:100%;" ng-if="$index===2 && d.length>9" title="{{d}}">{{d.substring(0,8)}}...</div>
                  <div style="width:100%;" ng-if="$index!==2">{{d}}</div>
                  <div style="width:100%;" ng-if="$index===2 && d.length<=9">{{d}}</div>
                </td>-->
                <td>{{data.settledate}}</td>
                <td>{{data.activitycode}}</td>
                <td>{{data.rspcodeheader}}</td>
                <td>{{data.rspdesc}}</td>
                <td>{{data.bipcode}}</td>
                <td>{{data.resultcode}}</td>
                <td>{{data.resultdesc}}</td>
                <td>{{data.orderno}}</td>
                <td>{{data.transido}}</td>
                <td>{{data.transactionid}}</td>
                <td>{{data.idvalue}}</td>
                <td>{{data.teqdate}}</td>
                <td>{{data.transidotime}}</td>
                <td>{{data.transidhtime}}</td>
                <td>{{data.isAccess}}</td>
                <!--<td><a ng-click="updateViews(data)">修改</a></td>-->
              </tr>
              </tbody>
            </table>
          </div>
        </div>
        <ds-page
            total-count="send.page.totalCount"
            page-size="send.page.pageSize"
            page-itmes="pageItems"
            param="send"
            current-page="send.page.currentPage"
            go-page="search(true)"
            show-max-page="5"
            first-text="<<"
            last-text=">
             >"
            previous-text="
             <"
            next-text=">
               "
            >
        </ds-page>
      </div>
  </div>
</div>